<?php
require_once('../inc/func/isLogin.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="../inc/pic/index/logo.ico" rel="shortcut icon" type="image/x-icon">
    <link rel="stylesheet" href="../inc/css/reset.css">
    <link rel="stylesheet" href="../inc/css/index.css">
    <link rel="stylesheet" href="../inc/css/form.css">
    <title>学生成绩录入</title>
</head>
<body>
    <header>
        <!-- top-nav -->
        <nav>
            <div>
                <!-- 左侧导航 -->
                <div class="left">
                    <ul>
                        <li><a href="javascript:;">报考学生</a></li>
                        <li><a href="javascript:;">在校生</a></li>
                        <li><a href="javascript:;">教职员</a></li>
                        <li><a href="javascript:;">家长|访客</a></li>
                        <li><a href="javascript:;">校友</a></li>
                    </ul>
                </div>
                <!-- 右侧导航 -->
                <div class="right">
                    <ul>
                    <li><a href=<?=isset($_COOKIE['uName']) ? '../logout.php' : '../login.php' ?>><?=isset($_COOKIE['uName']) ? '退出登录' : '登录' ?></a></li>
                        <li><a href="javascript:;">邮件</a></li>
                        <li><a href="javascript:;">通知</a></li>
                        <li><a href="javascript:;">会议</a></li>
                        <li><a href="javascript:;">网上服务大厅</a></li>
                        <li>|</li>
                        <li><a href="javascript:;">图书馆</a></li>
                        <li>|</li>
                        <li><a href="javascript:;">English<span></span></a></li>
                        <li><a href="javascript:;" title="搜索"></a></li>
                    </ul>
                </div>
            </div>
        </nav>
        <!-- logo -->
        <div class="logo">
            <div>
                <a href="../index.php" title="暨南大学"><img src="../inc/pic/index/logo2.svg" alt=""></a>
                <h1>学生成绩录入</h1>
            </div>
        </div>
    </header>

    <!-- 菜单 -->
    <div id="menu-bar">
        <div id="menu">
            <ul class="nav">
                <li><a href="javascript:;">学校概况</a></li>
                <li><a href="javascript:;">组织机构</a></li>
                <li><a href="javascript:;">人才培养</a></li>
                <li><a href="javascript:;">教师成绩录入</a></li>
                <li><a href="../school/tTask.php">教学任务查询</a></li>
                <li><a href="javascript:;">用户设置</a></li>
                <!-- 小船 -->
                <li><div id="ship"><img src="../inc/pic/index/top_ship.png" alt=""></div></li>
                
            </ul>
            <!-- 二级菜单 -->
            <div id="inside-menu">
                <div>

                    <!-- 左侧背景图片 -->
                    <div class="bg-color">

                    </div>
                    <!-- 右侧二级菜单 -->
                    <div class="inside-right">
                        <div class="img">
                            <img src="../inc/pic/index/zh.png" alt="">
                        </div>
                        <ul>
                            <li>学校简介</li>
                            <li>领导致辞</li>
                            <li>董事会</li>
                            <li>现任领导</li>
                            <li>大学章程</li>
                            <li>校训、校徽、校歌</li>
                            <li>暨南精神</li>
                            <li>学校风景</li>
                        </ul>
                        <ul>
                            <li>管理服务</li>
                            <li>院系设置</li>
                            <li>珠海校区</li>
                            <li>番禺校区</li>
                            <li>深圳校区</li>
                        </ul>
                        <ul>
                            <li>教师队伍</li>
                            <li>研究生教育</li>
                            <li>本科生教育</li>
                            <li>继续教育</li>
                            <li>华文教育</li>
                            <li>专业学位</li>
                            <li>创新创业教育</li>
                        </ul>
                        <ul>
                            <li>科研机构</li>
                            <li>学科建设</li>
                            <li>学术期刊</li>
                            <li>成果荟萃</li>
                        </ul>
                        <ul>
                            <li>国际交流</li>
                            <li>对外联络</li>
                            <li>校友会</li>
                        </ul>
                        <ul>
                            <li><a href="portrait.php">设置头像</a></li>
                            <li>生活服务</li>
                            <li>学生管理</li>
                            <li>学生发展</li>
                            <li>学生活动</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <main class="main-head">
        <!-- 已登录用户信息 -->
        <div class="user-info">
            <img src="<?=$_COOKIE['uImg']?>" alt="" class="user-icon">
            <span>您好!</span>
            <span><?=$_COOKIE['uName']?></span>
            <span>
                <?php 
                echo($_COOKIE['role'] == '0' ? "学号: {$_COOKIE['uId']}" : "工号:{$_COOKIE['uId']}");
                ?>
            </span>
            <span>系: <?=$_COOKIE['uDep']?></span>
        </div>
    
        <div>
            当前位置: 学生成绩录入
        </div>
        <form action="./scoreIn.php" enctype="multipart/form-data" method="post">
            <label for="user-icon-input" id="user-icon">
                <span id="user-icon-tips">上传EXCEL文件</span>
                <input type="file" name="file" id="user-icon-input">
            </label>
            <input type="submit" value="提交" id="submit"> 
        </form>
    </main>
</body>
<script src="../inc/js/jquery-3.6.0.min.js"></script>
<script src="../inc/js/index.js"></script>
<script>
    $('#user-icon-input').on('change', function(){
        $('#user-icon-tips').text($('#user-icon-input').prop('files')[0].name)
    })
</script>
<style>
    #user-icon-input {
        width: inherit;
        height: inherit;
        opacity: 0;
        position: absolute;
    }
    #user-icon {
        box-sizing: border-box;
        margin: 0 auto;
        display: flex;
        height: 10rem;
        width: 10rem;
        border: solid skyblue 1px;
        border-radius: 10%;
        justify-content: center;
        align-items: center;
        color: skyblue;
        overflow: hidden;
        position: relative;
    }
    #user-icon:hover {
        cursor: pointer;
    }

    #submit {
        display: block;
        margin: 3rem auto;
        width: 5rem;
        height: 2rem;
        background-color: rgb(0,220,255);
        color: white;
        border:solid skyblue 1px;
        font-weight:bolder;
        border-radius: 10%;

    }
    #submit:hover {
        cursor: pointer;
        background-color: rgb(0,180,255);
    }
</style>
</html>